package com.owen.minio.util.file;

import com.owen.minio.util.file.entity.FileBean;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

public interface FileUtils {

    FileBean uploadFile(File file, FileBean fileBean) throws IOException;

    FileBean uploadFile(InputStream inputStream, FileBean fileBean) throws IOException;

    FileBean uploadFile(byte[] data, FileBean fileBean) throws IOException;

    InputStream downloadFileToStream(FileBean fileBean) throws IOException;

    byte[] downloadFileToByte(FileBean fileBean) throws IOException;

    void downloadFileToFile(FileBean fileBean,File file) throws IOException;

    boolean deleteFile(FileBean fileBean);

    boolean isFileExists(FileBean fileBean);
}
